package com.example.last.dao;

import com.example.last.entity.Log;
import com.example.last.entity.Params;
import com.example.last.entity.Type;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LogDao {
    List<Log> findBySearch(@Param("params") Params params);

    @Insert("Insert into log (name, time, username, ip) values (#{name}, #{time}, #{username}, #{ip})")
    void add(Log log);

    @Delete(("delete from log where id = #{id} "))
    void delete(Integer id);

}
